package com.cosina.game.robodefence.ui.drawable;


import com.cosina.game.robodefence.ui.view.ViewPort;

import android.graphics.Canvas;

public class DrawManager {

	private static TowerDrawable towerDrawable = new TowerDrawable();
	
	private static EnemiesDrawable enemiesDrawable = new EnemiesDrawable ();
	private static FingerDrawable fingerDrawable = new FingerDrawable();
	private static DiagDrawable diagDrawable = new DiagDrawable();
	private static MenuItemDrawable menuItemDrawable = new MenuItemDrawable();
	private static GameOverDrawable gameOverDrawable= new GameOverDrawable();
	public static void drawTower(Canvas canvas) {
		towerDrawable.draw(canvas);
	}
	
	public static void drawObjects(Canvas canvas) {
		enemiesDrawable.draw(canvas);
	}
	
	public static void drawFinger(Canvas canvas){
		int hsc = ViewPort.hsv.getScrollX();
		int vsc = ViewPort.vsv.getScrollY();
		canvas.translate(-hsc, -vsc);
		fingerDrawable.draw(canvas);
		canvas.translate(hsc, vsc);
	}
	
	public static void drawDiag(Canvas canvas){
		diagDrawable.draw(canvas);
	}
	
	public static void drawMenuItem(Canvas canvas, int moveDown){
		canvas.translate(0, moveDown);
		menuItemDrawable.draw(canvas);
		canvas.translate(0, -moveDown);
	}
	
	
	public static void drawGameOver(Canvas canvas){
		gameOverDrawable.draw(canvas);
	}
}
